home *** CD-ROM | disk | FTP | other *** search
- ┌───────────────────────────────────────────────────────────────────────────┐
- │ Mod Name: WMCHAT2.MOD │
- │ WWIV version: 4.24a │
- │ Difficulty: Medium. │
- │ Date: 3/7/96 │
- │ Modifies: BBS.C, BBSUTL.C, BBSUTL1.C, COM.C, INSTMSG.C, LILO.C, MMENU.C, │
- │ MULTINST.C, MAKEFILE.MAK, and VARS.H. │
- │ Author: Pug, 1@11750 (WWIVnet), 1@1 (IsleLink) │
- └───────────────────────────────────────────────────────────────────────────┘
-
- Legend:
- .______________________.
- | == | Existing code |
- | ++ | Add this line |
- | -- | Remove this line|
- | =+ | Change this line|
- .----------------------.
-
- Step 1: BACK UP YOUR SOURCE CODE!
-
- Step 2: Get yourself a beer.
-
- Step 3: Open INSTMSG.C
-
- Make changes to handle_inst_msg():
-
- == nln(2);
- == read_user(ih->from_user,&u);
- ++ if (in_chatroom) {
- ++ i=0;
- ++ nl();
- ++ while (i<ih->msg_size)
- ++ outchr(msg[i++]);
- ++ return(ih->main);
- ++ }
- == if (ih->main==INST_MSG_STRING)
- == npr("1%.12s (%d)0> 2",nam(&u,ih->from_user), ih->from_inst);
-
- Save INSTMSG.C
-
- Step 4: Open MULTINST.C
-
- Make changes to make_inst_str():
-
- ==
- ++ d = wmchat_str;
- == get_inst_info(wi, &ir);
- == sprintf(s,"1%-3d",wi);
-
- Skipping down some...
-
- == case INST_LOC_EVENT:
- == sprintf(s1,"%-25.25s",get_string(1216));
- == break;
- ++ case INST_LOC_CH1:
- ++ sprintf(s1,"%s1", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH2:
- ++ sprintf(s1,"%s2", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH3:
- ++ sprintf(s1,"%s3", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH4:
- ++ sprintf(s1,"%s4", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH5:
- ++ sprintf(s1,"%s5", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH6:
- ++ sprintf(s1,"%s6", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH7:
- ++ sprintf(s1,"%s7", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH8:
- ++ sprintf(s1,"%s8", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH9:
- ++ sprintf(s1,"%s9", get_stringx(4,55));
- ++ break;
- ++ case INST_LOC_CH10:
- ++ sprintf(s1,"%s10", get_stringx(4,55));
- ++ break;
- == case INST_LOC_CHAT:
- == sprintf(s1,"%-25.25s",get_string(1218));
- == break;
-
- Save MULTINST.C
-
- Step 5: Open COM.C
-
- Locate and add the following code in nl();
-
- == else
- == outstr("\r\n");
- -- if (inst_msg_waiting())
- ++ if (inst_msg_waiting() && !chatline)
- == process_inst_msgs();
- ==}
-
- Locate and add the following code in skey1():
-
- == case 18:
- == if (echo)
- == reprint();
- == break;
- ++ case 12: /* CTRL - L */
- ++ if(so())
- ++ toggle_invis();
- ++ break;
- ++ case 14: /* CTRL - N */
- ++ toggle_avail();
- ++ break;
- == case 25:
-
- Locate and add the following code in input1():
-
- == while (!done && !hangup) {
- == ch = getkey();
- ++ if(curpos) chatline=1;
- ++ else chatline=0;
- == if (in_ansi) {
- == if ((in_ansi==1) && (ch!='['))
-
- Save COM.C
-
- Step 6: Open LILO.C
-
- In function logon(), make appropriate changes:
-
- == prt(3,get_string(378));
- == nl();
- == }
- ++ if (((incom) || (sysop1())) && (thisuser.sl < 255)) {
- ++ sprintf(s, "%s %s", thisuser.name, get_string(1172));
- ++ broadcast(s);
- ++ }
- -- if ((incom) || (sysop1()))
- -- broadcast(get_string(1172));
- == setiia(90);
-
- Skipping down some...
-
- == if (usernum>0) {
- ++ if (((incom) || (sysop1())) && (thisuser.sl < 255)) {
- ++ sprintf(s, "%s %s", thisuser.name, get_string(1173));
- ++ broadcast(s);
- ++ }
- -- if ((incom) || (sysop1()))
- -- broadcast(get_string(1173));
- == }
- == setiia(90);
-
- Save LILO.C
-
- Step 7: Open VARS.H
-
- Make appropriate changes:
-
- == #include "os2lib.h"
- == #endif
- ==
- == #include "fcns.h"
- ++ #include "wmchat.h"
-
- Skipping down some..
-
- == __EXTRN__ unsigned short com_speed, *csn_index, crc, *gat, modem_flag,
- == modem_mode, modem_speed, net_sysnum, curloc, eflags;
- ==
- ++ __EXTRN__ ch_action *actions[MAX_NUM_ACT];
- ++
- ++ __EXTRN__ int in_chatroom, chatline, invis, num_act, avail, d, wmchat_str;
- ++
- == __EXTRN__ unsigned int subconfnum, dirconfnum;
-
- Save VARS.H
-
- Step 8: Open BBSUTL1.C
-
- In function write_instance(), make the following changes:
-
- == if (useron) {
- == cf |= INST_FLAGS_ONLINE;
- ++ if (invis) cf |= INST_FLAGS_INVIS;
- == if (!(thisuser.sysstatus & sysstatus_no_msgs)) {
-
- Skipping down some...
-
- == case INST_LOC_EMAIL:
- == case INST_LOC_CHATROOM:
- == case INST_LOC_RMAIL:
- ++ if(avail)
- == cf |= INST_FLAGS_MSG_AVAIL;
- == break;
- ++ default:
- ++ if ((loc >= INST_LOC_CH1) && (loc <= INST_LOC_CH10) && avail)
- ++ cf |= INST_FLAGS_MSG_AVAIL;
- ++ break;
- == }
- -- } else if (loc == INST_LOC_CHATROOM) {
- -- cf |= INST_FLAGS_MSG_AVAIL;
- == }
- == if (using_modem)
-
- Skipping down some...
-
- == ti.flags |= flags;
- == }
- == }
- ==
- ++ if((ti.flags & INST_FLAGS_INVIS) && (!invis)) {
- ++ cf = 0;
- ++ if (ti.flags & INST_FLAGS_ONLINE) cf |= INST_FLAGS_ONLINE;
- ++ if (ti.flags & INST_FLAGS_MSG_AVAIL) cf |= INST_FLAGS_MSG_AVAIL;
- ++ re_write = 1;
- ++ }
- ++
- == if (cf!=ti.flags)
-
- Skipping down some more...
-
- == re_write=1;
- == ti.loc=loc;
- == }
- ==
- ++ if((((ti.flags & INST_FLAGS_INVIS) && (!invis)) ||
- ++ ((!(ti.flags & INST_FLAGS_INVIS)) && (invis))) ||
- ++ (((ti.flags & INST_FLAGS_MSG_AVAIL) && (!avail)) ||
- ++ ((!(ti.flags & INST_FLAGS_MSG_AVAIL)) && (avail))) &&
- ++ (ti.loc!=INST_LOC_WFC)) re_write=1;
- ++
- == if (re_write) {
-
- Save BBSUTL1.C
-
- Step 9 Open UTILITY.C
-
- Locate this code in giveup_timeslice(), add marked line:
-
- == /* delay(17); */
- == }
- ==#endif
- ++ if ((!in_chatroom) || (!chatline))
- == if (inst_msg_waiting())
- == process_inst_msgs();
-
- Save UTILITY.C
-
- Step 10: Open MAKEFILE.MAK
-
- If you are using BORLAND C++, make the following changes.
- Otherwise proceed down to the instructions for Turbo C++.
-
- == BBS_OVL = \
- == batch.obj bbsovl1.obj bbsovl2.obj bbsovl3.obj \
- == chnedit.obj conf.obj defaults.obj diredit.obj \
- == extrn1.obj gfiles.obj gfledit.obj ini.obj \
- == instmsg.obj lilo.obj misccmd.obj multinst.obj \
- == multmail.obj netsup.obj newuser.obj qwk.obj \
- == qwk1.obj readmail.obj ripovl.obj sr.obj \
- == srrcv.obj srsend.obj subedit.obj subreq.obj \
- == subxtr.obj sysopf.obj tedit.obj uedit.obj \
- == voteedit.obj xferovl.obj xferovl2.obj xfertmp.obj \
- -- xinit.obj
- ++ xinit.obj wmchat.obj
- ==
- == BBS_O_OVL = \
- == $(OBJ)\batch.obj $(OBJ)\bbsovl1.obj $(OBJ)\bbsovl2.obj \
- == $(OBJ)\bbsovl3.obj $(OBJ)\chnedit.obj $(OBJ)\conf.obj \
- == $(OBJ)\defaults.obj $(OBJ)\diredit.obj $(OBJ)\extrn1.obj \
- == $(OBJ)\gfiles.obj $(OBJ)\gfledit.obj $(OBJ)\ini.obj \
- == $(OBJ)\instmsg.obj $(OBJ)\lilo.obj $(OBJ)\misccmd.obj \
- == $(OBJ)\multinst.obj $(OBJ)\multmail.obj $(OBJ)\netsup.obj \
- == $(OBJ)\newuser.obj $(OBJ)\qwk.obj $(OBJ)\qwk1.obj \
- == $(OBJ)\readmail.obj $(OBJ)\ripovl.obj $(OBJ)\sr.obj \
- == $(OBJ)\srrcv.obj $(OBJ)\srsend.obj $(OBJ)\subedit.obj \
- == $(OBJ)\subreq.obj $(OBJ)\subxtr.obj $(OBJ)\sysopf.obj \
- == $(OBJ)\tedit.obj $(OBJ)\uedit.obj $(OBJ)\voteedit.obj \
- == $(OBJ)\xferovl.obj $(OBJ)\xferovl2.obj $(OBJ)\xfertmp.obj \
- -- $(OBJ)\xinit.obj
- ++ $(OBJ)\xinit.obj $(OBJ)\wmchat.obj
-
- If you are using TURBO C++, make following changes. Otherwise
- Save MAKEFILE.MAK and proceed to step 11.
-
- == BBS_OVL = \
- == $(OBJ)newuser.obj $(OBJ)sysopf.obj $(OBJ)voteedit.obj\
- == $(OBJ)gfledit.obj $(OBJ)tedit.obj $(OBJ)chnedit.obj\
- == $(OBJ)uedit.obj $(OBJ)diredit.obj $(OBJ)subedit.obj\
- == $(OBJ)xferovl.obj $(OBJ)multmail.obj $(OBJ)gfiles.obj\
- == $(OBJ)defaults.obj $(OBJ)misccmd.obj $(OBJ)xinit.obj\
- == $(OBJ)xfertmp.obj $(OBJ)batch.obj $(OBJ)srrcv.obj\
- == $(OBJ)srsend.obj $(OBJ)lilo.obj $(OBJ)subreq.obj\
- == $(OBJ)netsup.obj $(OBJ)subxtr.obj $(OBJ)multinst.obj\
- == $(OBJ)conf.obj $(OBJ)readmail.obj $(OBJ)instmsg.obj\
- == $(OBJ)bbsovl1.obj $(OBJ)extrn1.obj $(OBJ)bbsovl2.obj\
- == $(OBJ)sr.obj $(OBJ)ini.obj $(OBJ)xferovl2.obj\
- == $(OBJ)bbsovl3.obj $(OBJ)qwk.obj $(OBJ)qwk1.obj\
- -- $(OBJ)ripovl.obj
- ++ $(OBJ)ripovl.obj $(OBJ)wmchat.obj
-
- Skipping down some...
-
- == $(OBJ)qwk1.obj : qwk1.c vars.h vardec.h net.h
- == $(TCC_OVL)
- == $(OBJ)ripovl.obj : ripovl.c vars.h vardec.h net.h
- == $(TCC_OVL)
- ++ $(OBJ)wmchat.obj : wmchat.h
- ++ $(TCC_OVL)
-
- Save MAKEFILE.MAK
-
- Step 11: Open MMENU.C
-
- Make appropriate changes to mainmenu()
-
- == extern_prog(s1, sysinfo.spawn_opts[8]);
- == } else
- -- chat_room();
- ++ wmchat();
- == }
- == if (strcmp(s,"/Z")==0) {
-
- Step 12: Open BBSUTL.C
-
- Add the marked line to set_language_1():
-
- == set_strings_fn(2, languagedir, "YES.STR", 0);
- == set_strings_fn(3, languagedir, "NO.STR", 0);
- ++ set_strings_fn(wmchat_str, languagedir, "WMCHAT.STR", 0);
-
- Save BBSUTL.C
-
- Step 13: Open BBS.C
-
- Add this line in function main():
-
- == } else {
- == instance=1;
- == }
- ++ set_wmstr();
- == already_on=0;
- == endday=0;
- == oklevel=0;
-
- Save BBS.C
-
- Step 14: Copy WMCHAT.OBJ into your OBJ directory (normally in a
- sub-directory of your source code's directory.)
-
- Step 15: Copy WMCHAT.H to your source code directory.
-
- Step 16: Copy WMCHAT.INI to your WWIV BBS directory.
-
- Step 17: Copy WMCHAT.STR to your BBS language directory (usually GFILES).
- If you use multiple languages, be sure to copy WMCHAT.STR to ALL
- the directories.
-
- Step 18: Copy WMCHAT.ANS and WMCHAT.MSG into your GFILES directory.
-
- Step 19: Recompile!
-
- A tip -- you no longer need the internal WWIV chatroom, you may
- wish to delete it to save memory.
-